﻿cmake_minimum_required (VERSION 3.8)

project(map_test)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{CXXFLAGS} -w")
add_definitions(-DLINUX -DBOOST_LOG_DYN_LINK)
add_definitions("-g -ggdb -O0 -fPIC")

set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ version selection")  # or 11, 14, 17, 20
set(CMAKE_CXX_STANDARD_REQUIRED ON)  # optional, ensure standard is supported

# 需要编译的 proto 文件
file (GLOB PROTO_SOURCE_FILES
    "${CMAKE_SOURCE_DIR}/protobuf/*.proto"
)

set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs)

include_directories(${CMAKE_SOURCE_DIR} ~/ficc_deps/include ${CMAKE_SOURCE_DIR}/protobuf)
link_directories(~/ficc_deps/lib)

add_executable(interprocess_client interprocess_client.cpp custom_data.cpp)
target_link_libraries(interprocess_client PUBLIC protobuf pthread dl util rt)

add_executable(interprocess_server interprocess_server.cpp custom_data.cpp)
target_link_libraries(interprocess_server PUBLIC protobuf pthread dl util rt)
